<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<script>
var _baseUrl = "${_baseUrl }";
</script>

<!-- 所有都需要引入的公共js -->
<script type="text/javascript" src="${_resources}jq/jquery-1.11.2.js"></script>
<script type="text/javascript" src="${_resources}jq/jquery.cookie.js"></script>
<script type="text/javascript" src="${_resources}jq/jquery.form.js"></script>

<!-- ie8 兼容bootstrap  -->
<script src="${_resources}js/html5shiv.min.js"></script>
<script src="${_resources}js/respond.min.js"></script>

<!-- bootstrap table js 表格插件 -->
<script src="${_resources}bootstrap/bootstrap.min.js"></script>	
<script src="${_resources}bootstrap/bootstrap-table.js"></script>

<!-- 表单验证 jquery.validationEngine -->
<script src="${_resources}validationEngine/jquery.validationEngine.js"></script>
<script src="${_resources}validationEngine/jquery.validationEngine-zh_CN.js"></script>
<link rel="stylesheet" href="${_resources}validationEngine/validationEngine.jquery.css">

<!-- 弹出框js -->
<script type="text/javascript" src="${_resources}layer/layer.js"></script>

<!-- 前台框架共有css -->
<link href='${_resources}css/bootstrap.min.css' type='text/css' rel='stylesheet' />
<link href='${_resources}css/bootstrap-table.min.css' type='text/css' rel='stylesheet' />
<link type="text/css" rel="stylesheet" href="${_resources}css/response.css">
<%-- <link type="text/css" rel="stylesheet" href="${_resources}css/jquery.jscrollpane.css"> --%>
<link type="text/css" rel="stylesheet" href="${_resources}css/style.css">

<!--  树结构  -->
<script type="text/javascript" src="${_resources}js/jquery.ztree.core.js"></script>
<link rel="stylesheet" href="${_resources}css/zTreeStyle.css" type="text/css">

<link rel="stylesheet" href="${_resources}css/zTreeStyle/zTreeStyle.css" type="text/css">
<script type="text/javascript" src="${_resources}js/jquery.ztree.excheck.js"></script>
<script type="text/javascript" src="${_resources}js/jquery.ztree.exedit.js"></script>

<script language="javascript" type="text/javascript" src="${_resources}js/html5.js"></script>
<script language="javascript" type="text/javascript" src="${_resources}js/slides.jquery.js"></script>
<%-- <script language="javascript" type="text/javascript" src="${_resources}js/jquery.jscrollpane.js"></script> --%>
<%-- <script language="javascript" type="text/javascript" src="${_resources}js/jquery.mousewheel.js"></script> --%>
<script language="javascript" type="text/javascript" src="${_resources}js/common.js"></script>

<script language="javascript" type="text/javascript" src="${_resources}js/clearCross.js"></script>   <!-- 添加clearCross样式 -->
<script language="javascript" type="text/javascript" src="${_resources}js/inputFile.js"></script>   <!-- 添加input_file样式 -->
<script language="javascript" type="text/javascript" src="${_resources}js/jquery.placeholder.min.js"></script><!-- ie10以下placeholder兼容样式 -->
<script type="text/javascript">
/* var secagent = null;
var user_name = "${userId}";
var senslevel = '${systemLevel}';
on_load();
login();
function on_load()
{
    if(navigator.appName != "Microsoft Internet Explorer"){
        alert("Your browser is not supported");
        return;
    }
    try{
        secagent = new ActiveXObject("sensinfoctrl.SecAgent");
    }catch(e){
    }
    if(secagent == null){
        alert("cannot create SecAgent");
    }
}

function login()
{
    if(secagent != null){
        secagent.Login(user_name, senslevel);
    }
}

function logout()
{
    if(secagent != null){
        secagent.Logout();
    }
}


function check(fileDocObject){
	if(secagent != null){
		var filename = fileDocObject.value();
		if(filenamel.length > 0){
			var sensinfo = secagent.GetSensInfo(filename);
			var len = secagent.GetFileLength(filename);
			var lev = sensinfo.split(";")[0].split("=")[1];
			if(sensinfo == ""){
				return;
			}
			if(lev>senslevel){
				layer.msg("文件密级超过人员密级");
				$(fileDocObject).after($(fileDocObject).clone().val(""));
				$(fileDocObject).remove();
				return;
			}
			
		}
	}
} */

var _baseUrl = "${_baseUrl }";
//ie10以下placeholder兼容样式
$(function () {
    //浏览器不支持 placeholder 时才执行
    if (!('placeholder' in document.createElement('input'))) {
        $('[placeholder]').each(function () {
            var $tag = $(this); //当前 input
            var $copy = $tag.clone();   //当前 input 的复制
            if ($copy.val() == "") {
                $copy.css("color", "#999");
                $copy.val($copy.attr('placeholder'));
            }
            $copy.focus(function () {
                if (this.value == $copy.attr('placeholder')) {
                    this.value = '';
                    this.style.color = '#000';
                }
            });
            $copy.blur(function () {
                if (this.value=="") {
                    this.value = $copy.attr('placeholder');
                    $tag.val("");
                    this.style.color = '#999';
                } else {
                    $tag.val(this.value);
                }
            });
            $tag.hide().after($copy.show());    //当前 input 隐藏 ，具有 placeholder 功能js的input显示
        });
    }
});

if (!Array.prototype.indexOf)
{
  Array.prototype.indexOf = function(elt /*, from*/)
  {
    var len = this.length >>> 0;

    var from = Number(arguments[1]) || 0;
    from = (from < 0)
         ? Math.ceil(from)
         : Math.floor(from);
    if (from < 0)
      from += len;

    for (; from < len; from++)
    {
      if (from in this &&
          this[from] === elt)
        return from;
    }
    return -1;
  };
}

$.ajaxSetup( {
    //设置ajax请求结束后的执行动作
    complete :
        function(XMLHttpRequest, textStatus) {
            // 通过XMLHttpRequest取得响应头，sessionstatus
            var sessionstatus = XMLHttpRequest.getResponseHeader("sessionstatus");
            if (sessionstatus == "TIMEOUT") {
                var win = window;
                while (win != win.top){
                    win = win.top;
                }
                window.location.href= "${_baseUrl}/"+XMLHttpRequest.getResponseHeader("CONTEXTPATH");
            }
        }
});
</script>







